package org.formal.system.entity;

import java.util.ArrayList;
import java.util.List;
import javax.persistence.Column;
import javax.persistence.Table;
import javax.persistence.Transient;

import lombok.Data;
import lombok.EqualsAndHashCode;
import org.formal.common.base.BaseEntity;

/**
 * @ClassName UserEntity
 * @Description 
 * @author jiangyan
 * @date 2017-11-14 16:32:47
 * @version 1.0 
 */
@Data
@Table(name = "sys_user")
@EqualsAndHashCode(callSuper = true)
public class UserEntity extends BaseEntity {

	/**
	 * 
	 */
	private static final long serialVersionUID = -5400866467137760405L;
	/**
	 *  昵称
	 */
	@Column(name="NICK_NAME")
	private String nickName;
	/**
	 *  登录名称
	 */
	@Column(name="LOGIN_NAME")
	private String loginName;
	/**
	 *  用户名密码
	 */
	@Column(name="PASSWORD")
	private String password;
	
	/**
	 *  登录状态 true 登录 禁用
	 */
	@Column(name="IS_OPEN")
	private Boolean isOpen;
	/**
	 *  手机号
	 */
	@Column(name="PHONE")
	private String phone;
	
	/**
	 * 电子邮件
	 */
	@Column(name="EMAIL")
	private String email;
	/**
	 *  最后登录ip
	 */
	@Column(name="LAST_UPDATE_IP")
	private String lastUpdateIp;
	
	@Transient
	private String roleIds;
	
	@Column(name="PICTURE")
	private String picture;
	
	/**
	 * 角色集
	 */
	@Transient
	private List<RoleEntity> roleList = new ArrayList<RoleEntity>();

}